package top.vanchor.myblog2back.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author Ding
 * @since 2022-01-27
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class BackAuthRule implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 权限id
     */
    @TableId(value = "r_id", type = IdType.AUTO)
    private Integer ruleId;

    /**
     * 菜单标题
     */
    private String title;

    /**
     * 菜单url
     */
    private String path;

    /**
     * 状态：-1删除，0禁用，1正常
     */
    @TableField(value = "`status`")
    private String status;

    /**
     * 图标
     */
    private String icon;

    /**
     * 0：后台，1：平台
     */
    private String cate;

    /**
     * 父级id
     */
    @TableField(value = "`pid`")
    private Integer pid;

    /**
     * 创建时间
     */
    private Long createTime;

    /**
     * 修改时间
     */
    private Long updateTime;

    @TableField(value = "`groupRuleLists`")
    private String groupRuleLists;

    @TableField(exist = false)
    private String groupRuleLists1;

    private String component;

    private String name;

    private Integer disabled;

    /**
     * 工具list
     */
    @TableField(exist = false)
    private List<BackAuthRule> children = new ArrayList<>();

    @TableField(exist = false)
    private JSONObject meta = new JSONObject();
}
